package com.share.common.utils.plugin.applicationEvent.example;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 事件监听器
 * @author lenovo
 *
 */
@Component
public class SendEmailHandler implements ApplicationListener<SendEmailEvent> {

	@Override
	public void onApplicationEvent(SendEmailEvent event) {
		System.out.println(this.getClass()+"得到邮件内容："+event.getMessage().getContent());
		System.out.println(this.getClass()+"得到邮件地址："+event.getMessage().getEmail());
	}

}
